package config

import (
	"github.com/kelseyhightower/envconfig"
)

// LoadTestConfig defines the configuration for load-test
type LoadTestConfig struct {
	ListenHost string `envconfig:"LISTEN_HOST" default:"0.0.0.0" json:"listen_host"`
	ListenPort int    `envconfig:"LISTEN_PORT" default:"2333" json:"listen_port"`
}

// GetLoadTestEnv gets all env variables related to dashboard.
func GetLoadTestEnv() (*LoadTestConfig, error) {
	cfg := LoadTestConfig{}
	err := envconfig.Process("", &cfg)
	return &cfg, err
}
